import { defineStore } from "pinia";
import {TaskList} from '@/types/task';

interface TaskListState {
    taskList:TaskList
}

export const useTaskListStore = defineStore("taskListStore",{
    state:():TaskListState=>({
        taskList: {} as TaskList
    }),
    getters: {
        title:(state)=>{
            return state.taskList.title
        }
    },
    actions: {
        setItem(item:TaskList){
            this.taskList = item
        }
    }
});